/**************************************************************************************
 *  Copyright (c)  2010  Leszek Karcz, Changmin Bae.
 *  Permission is granted to copy, distribute and/or modify this document
 *  under the terms of the GNU Free Documentation License, Version 1.3
 *  or any later version published by the Free Software Foundation;
 *  with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
 *  A copy of the license is included in the section entitled "GNU
 *  Free Documentation License". 
 **************************************************************************************/
package data.tileables;
import data.Map;
import data.Player;
import data.missions.PowerDown;
import data.missions.PowerUp;

/**************************************************************************************
 * Author(s): Leszek Karcz, Changmin Bae
 * Range unit basic fighter unit for defending
 **************************************************************************************/
public class Range extends FighterUnit
{
	public static final int [] PRICE = { 10, 15, 5 };
	public static final int BUILDTIME = 10;
		
	/**************************************************************************************
	 * Author(s): Leszek Karcz, Changmin Bae
	 * Range constructor
	 **************************************************************************************/
	public Range(int ID, int supertypeID, Player player)
	{
		super(ID, supertypeID, player);
		this.setType("Ranged");
		this.setImage("unit_range");
		this.setIcon("unit_range");
		this.setStats(50, 50, 10, 5, 15, 1);
		this.setUpkeep(new int[]{1,1,1});
		this.setNumberOfCommands(4);
	}
	
	
	/**************************************************************************************
	 * Author(s): Leszek Karcz, Changmin Bae
	 * returns list of possible commands
	 **************************************************************************************/
	public String[] getCommandsText()
	{
		return new String[]{"Go to rally #","Go to fort #","Decommision",(this.getState()==0 ? "Power up" : "Power down")};
	}
	public void die()
	{ 
		super.die();
		player.removeRanged(this);
	}
}
